//
//  THGradientView.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
/**
渐变View 只支持线性渐变
*/
@interface THGradientView : UIView

@property (readonly, nonatomic) NSArray<UIColor *> * colors;
@property (readonly, nonatomic) NSArray<NSNumber *> * locations;
@property (readonly,nonatomic) CGPoint startPoint;
@property (readonly,nonatomic) CGPoint endPoint;

+ (THGradientView *)instanceWithLeftColor:(UIColor *)leftColor rightColor:(UIColor *)rightColor;

+ (THGradientView *)instanceWithTopColor:(UIColor *)topColor bottomColor:(UIColor *)bottomColor;

- (void)setColors:(NSArray<UIColor *> *)colors locations:(NSArray<NSNumber *> *)locations;

- (void)setStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;

@end

NS_ASSUME_NONNULL_END
